﻿<%@ Page Title="" Language="C#" MasterPageFile="~/APP_Master/MasterPage_Default.master" AutoEventWireup="true" CodeFile="DataCenterDetail.aspx.cs" Inherits="DataCenterDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script src="App_Themes/js/jquery.min.js"></script>
    <%--  <script src="App_Themes/js/html5.js"></script>--%>
    <meta charset="utf-8">
    <link href="App_Themes/css/webstyle.css" rel="stylesheet" />
    <script src="App_Themes/js/jquery.fxTab.js" type="text/javascript"></script>
    <title>首页</title>
    <%--    <script src="App_Themes/js/png.js" type="text/javascript"></script>--%>
    
    <%-- <script type="text/javascript">
        PNG.fix('*');
    </script>--%>

    <style type="text/javascript">
        .menu_head {
        }

        .menu_body {
        }

            .menu_body a {
            }

                .menu_body a:hover {
                    text-decoration: none;
                }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {

            //firstpane
            $("#firstpane .menu_head").click(function () {
                $(this).next("div.menu_body").slideToggle(300).closest("tr").siblings().find("div.menu_body").slideUp(300);
                var $td = $(this).find('td').eq(3).text();
                var $indexTd = $(this).next("div.menu_body").find('td');
                var cptype = <%=Request["t"]%>;
             
                $.ajax({

                    url: "/Ajax/kaijiang.ashx?m=kaijiang&tdValue=" + $td + "&cptype=" + cptype,
                    method: "get",
                    type: "json",
                    success: function (data) {
                       var obj=eval("("+data+")");
                       var $spanRed = "";
                       var $spanblue = "";
                  
                        var MoneyNum = new Array("");
                        var Money = new Array("");
                        var CountNum = new Array("");
                      //$.each(obj,function (key, value) {
                        var ID = obj.a[0].id;
                        var NumBall = obj.a[0].LotteryNo;
                        MoneyNum[0] = obj.a[0].oneCount;
                        MoneyNum[1] = obj.a[0].twoCount;
                        Money[0] = obj.a[0].oneMoney;
                        Money[1] = obj.a[0].twoMoney;
                        //CountNum[0] = obj.b[0].oneCounts;
                        //CountNum[1] = obj.b[0].twoCount;
                        //CountNum[2] = obj.b[0].threeCounts;
                        //CountNum[3] = obj.b[0].fourCounts;
                        //CountNum[4]=obj.b[0].fiveCounts;
                        //CountNum[5]=obj.b[0].sixCounts;
                        //CountNum[6]=obj.b[0].sevenCounts;

                        var strlist = new Array();
                        var strlist1 = new Array();
                        if (NumBall.indexOf('+') > -1) {
                            var ball = NumBall.split('+');

                            strlist = ball[0].split(',');
                            strlist1 = ball[1].split(',');

                            for (var i = 0; i < strlist.length; i++) {
                                $spanRed += "<span class='dz_qiu'>" + strlist[i] + "</span>";
                            }
                            for (var k = 0; k < strlist1.length; k++) {

                                $spanblue += "<span class='dz_qiu1'>" + strlist1[k] + "</span>";
                            }
                            $indexTd.eq(3).innerHTML = $spanRed + $spanblue;
                          
                        }
                        else {
                            strlist = NumBall.split(',');
                            for (var j = 0; j < strlist.length; j++) {
                                $spanRed += "<span class='dz_qiu'>" + strlist[j] + "</span>";
                                $spanblue = "";
                            }
                        }

                        //});
                        $indexTd[3].innerHTML = ($spanRed + $spanblue);
                    
                        var result = "";
                        $indexTd[4].innerHTML = "";
                        if (parseInt(MoneyNum[0]) > 0) {

                            $indexTd[4].innerHTML += "一等奖：" + MoneyNum[0] + "注" + "," + "每注：" + Money[0] + "元 "+ "<br /> ";

                        }
                        if (parseInt(MoneyNum[1]) > 0) {

                            $indexTd[4].innerHTML += "二等奖：" + MoneyNum[1] + "注" + "," + "每注：" + Money[1] + "元 ";
                        }
                        result = $indexTd[4].innerHTML;
                     
                       
                        //var resul = "";
                        //$indexTd[5].innerHTML = "";
                        //var flag=0;
                        //if (parseInt(CountNum[0]) > 0) {

                        //    $indexTd[5].innerHTML += "一等奖：" + CountNum[0] + "注" + "&nbsp&nbsp&nbsp";
                        //    flag=flag+1;
                        //}
                        //if (parseInt(CountNum[1]) > 0) {

                        //    $indexTd[5].innerHTML += "二等奖：" + CountNum[1] + "注" + "&nbsp&nbsp&nbsp";
                        //    flag=flag+1;
                        //}
                        //if(flag==2)
                        //{
                        //    if (parseInt(CountNum[2]) > 0) {

                        //        $indexTd[5].innerHTML += "三等奖：" + CountNum[2] + "注" + "&nbsp&nbsp&nbsp" + " <br /> ";
                        //        flag=0;
                        //    }
                        //}
                        //else
                        //{
                        //    if (parseInt(CountNum[2]) > 0) {

                        //        $indexTd[5].innerHTML += "三等奖：" + CountNum[2] + "注" + "&nbsp&nbsp&nbsp";
                        //        flag=flag+1;
                        //    }
                        //}
                      
                        //if(flag==2)
                        //{
                        //    if (parseInt(CountNum[3]) > 0) {

                        //        $indexTd[5].innerHTML += "四等奖：" + CountNum[3] + "注" + "&nbsp&nbsp&nbsp"+ " <br /> ";
                        //        flag=0;
                        //    }
                        //}
                        //else
                        //{
                        //    if (parseInt(CountNum[3]) > 0) {

                        //        $indexTd[5].innerHTML += "四等奖：" + CountNum[3] + "注" + "&nbsp&nbsp&nbsp";
                        //        flag=flag+1;
                        //    }
                        //}
                       
                        //if(flag==2)
                        //{
                        //    if (parseInt(CountNum[4]) > 0) {

                        //        $indexTd[5].innerHTML += "五等奖：" + CountNum[4] + "注" + "&nbsp&nbsp&nbsp" + " <br /> ";
                        //        flag=0;
                        //    }
                        //}
                        //else
                        //{
                        //    if (parseInt(CountNum[4]) > 0) {

                        //        $indexTd[5].innerHTML += "五等奖：" + CountNum[4] + "注" + "&nbsp&nbsp&nbsp";
                        //        flag=flag+1;
                        //    }
                        //}
                        //if(flag==2)
                        //{
                        //    if (parseInt(CountNum[5]) > 0) {

                        //        $indexTd[5].innerHTML += "六等奖：" + CountNum[5] + "注" + "&nbsp&nbsp&nbsp" + " <br /> ";
                        //        flag=0;
                        //    }
                        //}
                        //else
                        //{
                        //    if (parseInt(CountNum[5]) > 0) {

                        //        $indexTd[5].innerHTML += "六等奖：" + CountNum[5] + "注" + "&nbsp&nbsp&nbsp";
                        //        flag=flag+1;
                        //    }
                        //}
                        //if(flag==2)
                        //{
                        //    if (parseInt(CountNum[6]) > 0) {

                        //        $indexTd[5].innerHTML += "七等奖：" + CountNum[6] + "注" + "&nbsp&nbsp&nbsp"+ " <br /> ";
                        //        flag=0;
                        //    }
                        //}
                        //else
                        //{
                        //    if (parseInt(CountNum[6]) > 0) {

                        //        $indexTd[5].innerHTML += "七等奖：" + CountNum[6] + "注" + "&nbsp&nbsp&nbsp";
                        //        flag=flag+1;
                        //    }
                        //}
                       
                        //resul = $indexTd[5].innerHTML;
                     
                    },
                    error: function () {
                        alert("错误");
                    }
                });



                $.ajax({

                    url: "/Ajax/BDkaijiang.ashx?m=BDkaijiang&tdValue=" + $td + "&cptype=" + cptype,
                    method: "get",
                    type: "json",
                    success: function (data) {
                        var obj=eval("("+data+")");
                        var CountNum = new Array("");
                        //$.each(obj,function (key, value) {
                        var ID = obj.a[0].id;
                        var NumBall = obj.a[0].LotteryNo;
                        //alert(NumBall);
                        //MoneyNum[0] = obj.a[0].oneCount;
                        //MoneyNum[1] = obj.a[0].twoCount;
                        //Money[0] = obj.a[0].oneMoney;
                        //Money[1] = obj.a[0].twoMoney;
                        CountNum[0] = obj.b[0].oneCounts;
                        CountNum[1] = obj.b[0].twoCount;
                        CountNum[2] = obj.b[0].threeCounts;
                        CountNum[3] = obj.b[0].fourCounts;
                        CountNum[4]=obj.b[0].fiveCounts;
                        CountNum[5]=obj.b[0].sixCounts;
                        CountNum[6]=obj.b[0].sevenCounts;

                        //var strlist = new Array();
                        //var strlist1 = new Array();
                        //if (NumBall.indexOf('+') > -1) {
                        //    var ball = NumBall.split('+');

                        //    strlist = ball[0].split(',');
                        //    strlist1 = ball[1].split(',');

                        //    for (var i = 0; i < strlist.length; i++) {
                        //        $spanRed += "<span class='dz_qiu'>" + strlist[i] + "</span>";
                        //    }
                        //    for (var k = 0; k < strlist1.length; k++) {

                        //        $spanblue += "<span class='dz_qiu1'>" + strlist1[k] + "</span>";
                        //    }
                        //    $indexTd.eq(3).innerHTML = $spanRed + $spanblue;
                          
                        //}
                        //else {
                        //    strlist = NumBall.split(',');
                        //    for (var j = 0; j < strlist.length; j++) {
                        //        $spanRed += "<span class='dz_qiu'>" + strlist[j] + "</span>";
                        //        $spanblue = "";
                        //    }
                        //}

                        //});
                        //$indexTd[3].innerHTML = ($spanRed + $spanblue);
                    
                        //var result = "";
                        //$indexTd[4].innerHTML = "";
                        //if (parseInt(MoneyNum[0]) > 0) {

                        //    $indexTd[4].innerHTML += "一等奖：" + MoneyNum[0] + "注" + "," + "每注：" + Money[0] + "元 "+ "<br /> ";

                        //}
                        //if (parseInt(MoneyNum[1]) > 0) {

                        //    $indexTd[4].innerHTML += "二等奖：" + MoneyNum[1] + "注" + "," + "每注：" + Money[1] + "元 ";
                        //}
                        //result = $indexTd[4].innerHTML;
                     
                       
                        var resul = "";
                        $indexTd[5].innerHTML = "";
                        var flag=0;
                        if (parseInt(CountNum[0]) > 0) {

                            $indexTd[5].innerHTML += "一等奖：" + CountNum[0] + "注" + "&nbsp&nbsp&nbsp";
                            flag=flag+1;
                        }
                        if (parseInt(CountNum[1]) > 0) {

                            $indexTd[5].innerHTML += "二等奖：" + CountNum[1] + "注" + "&nbsp&nbsp&nbsp";
                            flag=flag+1;
                        }
                        if(flag==2)
                        {
                            if (parseInt(CountNum[2]) > 0) {

                                $indexTd[5].innerHTML += "三等奖：" + CountNum[2] + "注" + "&nbsp&nbsp&nbsp" + " <br /> ";
                                flag=0;
                            }
                        }
                        else
                        {
                            if (parseInt(CountNum[2]) > 0) {

                                $indexTd[5].innerHTML += "三等奖：" + CountNum[2] + "注" + "&nbsp&nbsp&nbsp";
                                flag=flag+1;
                            }
                        }
                      
                        if(flag==2)
                        {
                            if (parseInt(CountNum[3]) > 0) {

                                $indexTd[5].innerHTML += "四等奖：" + CountNum[3] + "注" + "&nbsp&nbsp&nbsp"+ " <br /> ";
                                flag=0;
                            }
                        }
                        else
                        {
                            if (parseInt(CountNum[3]) > 0) {

                                $indexTd[5].innerHTML += "四等奖：" + CountNum[3] + "注" + "&nbsp&nbsp&nbsp";
                                flag=flag+1;
                            }
                        }
                       
                        if(flag==2)
                        {
                            if (parseInt(CountNum[4]) > 0) {

                                $indexTd[5].innerHTML += "五等奖：" + CountNum[4] + "注" + "&nbsp&nbsp&nbsp" + " <br /> ";
                                flag=0;
                            }
                        }
                        else
                        {
                            if (parseInt(CountNum[4]) > 0) {

                                $indexTd[5].innerHTML += "五等奖：" + CountNum[4] + "注" + "&nbsp&nbsp&nbsp";
                                flag=flag+1;
                            }
                        }
                        if(flag==2)
                        {
                            if (parseInt(CountNum[5]) > 0) {

                                $indexTd[5].innerHTML += "六等奖：" + CountNum[5] + "注" + "&nbsp&nbsp&nbsp" + " <br /> ";
                                flag=0;
                            }
                        }
                        else
                        {
                            if (parseInt(CountNum[5]) > 0) {

                                $indexTd[5].innerHTML += "六等奖：" + CountNum[5] + "注" + "&nbsp&nbsp&nbsp";
                                flag=flag+1;
                            }
                        }
                        if(flag==2)
                        {
                            if (parseInt(CountNum[6]) > 0) {

                                $indexTd[5].innerHTML += "七等奖：" + CountNum[6] + "注" + "&nbsp&nbsp&nbsp"+ " <br /> ";
                                flag=0;
                            }
                        }
                        else
                        {
                            if (parseInt(CountNum[6]) > 0) {

                                $indexTd[5].innerHTML += "七等奖：" + CountNum[6] + "注" + "&nbsp&nbsp&nbsp";
                                flag=flag+1;
                            }
                        }
                       
                        resul = $indexTd[5].innerHTML;
                     
                    },
                    error: function () {
                        alert("错误");
                    }
                });
            });

        });
    </script>
    <style type="text/css">
        .auto-style1 {
            width: 290px;
            height: 16px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <div class="nr" style="padding: 20px 0;">
            <div class="dz_top">
                <span class="dz_text1 fl"><%=Convert.ToInt32(cptype)==1? "双色球"
                                                                :Convert.ToInt32(cptype)==2 ?"大乐透"
                                                                :Convert.ToInt32(cptype)==3?"排列三"
                                                                   :Convert.ToInt32(cptype)==4 ?"排列五"
                                                                   :Convert.ToInt32(cptype)==5 ?"福彩3D"
                                                                   :Convert.ToInt32(cptype)==6 ?"七星彩"
                                                                   :Convert.ToInt32(cptype)==7?"七乐彩":""%> 
                    大奖排行榜</span> <span class="fl">截止<%=time %>，<%=Convert.ToInt32(cptype)==1? "双色球"
                                                                :Convert.ToInt32(cptype)==2 ?"大乐透"
                                                                :Convert.ToInt32(cptype)==3?"排列三"
                                                                   :Convert.ToInt32(cptype)==4 ?"排列五"
                                                                   :Convert.ToInt32(cptype)==5 ?"福彩3D"
                                                                   :Convert.ToInt32(cptype)==6 ?"七星彩"

                                                                   :Convert.ToInt32(cptype)==7?"七乐彩":""%>
                    已累计中奖 <span class="dz_text2"><%=yi %><%=wan %><%=yuan%></span></span>
                <!--<span class="fr">快速查询：<asp:DropDownList ID="qsDropDownList" runat="server" onchange="" class="settime_bd1" OnSelectedIndexChanged="qsSelectedIndexChanged" AutoPostBack="True">
                    <asp:ListItem Value="0">请选择</asp:ListItem>
                    <asp:ListItem Value="1">双色球</asp:ListItem>
                    <asp:ListItem Value="2">大乐透</asp:ListItem>
                    <asp:ListItem Value="3">排列三</asp:ListItem>
                    <asp:ListItem Value="4">排列五</asp:ListItem>
                    <asp:ListItem Value="5">福彩3D</asp:ListItem>
                    <asp:ListItem Value="6">七星彩</asp:ListItem>
                    <asp:ListItem Value="7">七乐彩</asp:ListItem>
                </asp:DropDownList></span>-->
                <a href="DataCenter.aspx"><span class="fr dz_text3">大奖总排行</span></a>
                <div class="cl"></div>
            </div>
            <div class="dz_k">
                <div class="dz_logo">

                    <%if (cptype == "1")
                        {  %>
                    <img src="images/shuangseqiu.png" width="70" height="75">
                    <% }  %>

                    <%if (cptype == "2")
                        {  %>
                    <img src="images/daletou.png" width="70" height="75">
                    <% }  %>

                    <%if (cptype == "3")
                        {  %>
                    <img src="images/pailiesan.png" width="70" height="75">
                    <% }  %>

                    <%if (cptype == "4")
                        {  %>
                    <img src="images/pailiewu.png" width="70" height="75">
                    <% }  %>

                    <%if (cptype == "5")
                        {  %>
                    <img src="images/fucai3d.png" width="70" height="75">
                    <% }  %>


                    <%if (cptype == "6")
                        {  %>

                    <img src="images/qixingcai.png" width="70" height="75">
                    <% }  %>


                    <%if (cptype == "7")
                        {  %>
                    <img src="images/qilecai.png" width="70" height="75">
                    <% }  %>
                </div>
                <ul>
                    <li><a href="DataCenterDetail.aspx?t=<%=cptype%>">全部</a> </li>
                    <li><a href="Buy.aspx?t=<%=cptype%>">合买</a> </li>
                    <li><a href="BuyYourself.aspx?t=<%=cptype%>" class="auto-style1">自购</a> </li>
                </ul>
                <span class="fr">注：自购用户无法定制跟单</span>
            </div>
            <div>
                <img src="images/w2.jpg" width="1200" height="77">
            </div>

            <!-- ================================================================================================================================ -->
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="dz_table menu_list" id="firstpane">
                <tr class="fb">
                    <td width="4%" height="45" align="center" valign="middle">&nbsp;</td>
                    <td width="8%" height="40" align="left" valign="middle">排名</td>
                    <td width="10%" align="left" valign="middle">用户名</td>
                    <td width="12%" align="center" valign="middle">购买期次</td>
                    <td width="11%" align="center" valign="middle">开奖日期 </td>
                    <td width="13%" align="center" valign="middle">购彩方式</td>
                    <td width="12%" align="center" valign="middle">投入金额</td>
                    <td width="18%" align="center" valign="middle">税前奖金</td>

                </tr>

                <%if (Dataall != null)
                    {
                        for (int i = 0; i < Dataall.Rows.Count; i++)

                        {
                            if (i < 3)
                            {
                                css = "dz_num";

                            }
                            else
                            {
                                css = "dz_num1";
                            }

                %>
                <tr>
                    <td colspan="9">
                        <div class="menu_head">

                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="4%" height="45" align="center" valign="middle">&nbsp;</td>
                                    <td width="8%" height="40" align="left" valign="middle" class="auto-style2">
                                        <div class="<%=css%>"><%=i+1%></div>
                                    </td>
                                    <td width="10%" align="left" valign="middle"><%=Dataall.Rows[i]["nickname"].ToString().Substring(1,1)+"**"%></td>
                                    <td width="12%" align="center" valign="middle"><%=Dataall.Rows[i]["LotteryOpenTime"]%></td>
                                    <td width="11%" align="center" valign="middle"><%=string.IsNullOrEmpty(Dataall.Rows[i]["openTime"].ToString())?"":Convert.ToDateTime(Dataall.Rows[i]["openTime"]).ToString("yyyy-MM-dd")%></td>
                                    <td width="13%" align="center" valign="middle"><%=Convert.ToInt32((Dataall.Rows[i]["fangshi"]).ToString())==2? "合买"
                                            :Convert.ToInt32((Dataall.Rows[i]["fangshi"]))==1?"自购":""%></td>
                                    <td width="12%" align="center" valign="middle"><%=Dataall.Rows[i]["MySub"]%></td>
                                    <td width="18%" align="center" valign="middle"><span class="dz_text"><%=Dataall.Rows[i]["WinMoney"]%></span>元</td>

                                </tr>
                            </table>
                        </div>
                        <div style="display: none" class="menu_body" onclick="">
                            <table id="firstpaneTable" width="100%" border="0" cellspacing="0" cellpadding="0" class="dz_table1">
                                <tr class="dz_table1_title">
                                    <td width="32%" align="center" valign="middle">开奖号码 </td>
                                    <td width="29%" align="center" valign="middle">当期全国开奖情况</td>
                                    <td width="28%" align="center" valign="middle">中奖注数</td>

                                </tr>
                                <tr>

                                    <td align="center" valign="middle"></td>
                                    <td align="center" valign="top"></td>
                                    <td align="center"></td>

                                </tr>
                            </table>
                        </div>

                    </td>

                </tr>
                <%}
                    } %>
            </table>

            <!-- ================================================================================================================================ -->
        </div>
    </div>
</asp:Content>







